package com.zr.model;
// Generated 2016-10-26 14:56:45 by Hibernate Tools 4.3.1.Final

import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * LMcustomer generated by hbm2java
 * 这是客户的模型
 */
@Entity
@Table(name = "l_mcustomer", catalog = "logistical_managementcrm")
public class LMcustomer implements java.io.Serializable {

	private Integer cid;
	private LMuser LMuser;
	private String cname;
	private String cage;
	private String cphone;
	private String ctemp;//备用字段
	private Set<LMorder> LMorders = new HashSet<LMorder>(0);

	public LMcustomer() {
	}

	public LMcustomer(LMuser LMuser, String cname, String cage, String cphone, String ctemp, Set<LMorder> LMorders) {
		this.LMuser = LMuser;
		this.cname = cname;
		this.cage = cage;
		this.cphone = cphone;
		this.ctemp = ctemp;
		this.LMorders = LMorders;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)

	@Column(name = "cid", unique = true, nullable = false)
	public Integer getCid() {
		return this.cid;
	}

	public void setCid(Integer cid) {
		this.cid = cid;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "uid")
	public LMuser getLMuser() {
		return this.LMuser;
	}

	public void setLMuser(LMuser LMuser) {
		this.LMuser = LMuser;
	}

	@Column(name = "cname")
	public String getCname() {
		return this.cname;
	}

	public void setCname(String cname) {
		this.cname = cname;
	}

	@Column(name = "cage")
	public String getCage() {
		return this.cage;
	}

	public void setCage(String cage) {
		this.cage = cage;
	}

	@Column(name = "cphone")
	public String getCphone() {
		return this.cphone;
	}

	public void setCphone(String cphone) {
		this.cphone = cphone;
	}

	@Column(name = "ctemp")
	public String getCtemp() {
		return this.ctemp;
	}

	public void setCtemp(String ctemp) {
		this.ctemp = ctemp;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "LMcustomer")
	public Set<LMorder> getLMorders() {
		return this.LMorders;
	}

	public void setLMorders(Set<LMorder> LMorders) {
		this.LMorders = LMorders;
	}

}
